A compound image is an image that depicts multiple types of content with completely different characteristics. For a non-limiting example, a screenshot may contain textual images (such as simple text) rendered on solid background as well as continuous-tone images. Since the characteristics of textual images and continuous-tone images are substantially different—textual images typically have very few colors with sharp edges separating pixels of different colors, whereas continuous-tone images tend to have a large number of colors with smooth transitions between neighboring pixels, it is very difficult to design a single compression approach that works well for compound images.
One way to address the challenge of compressing compound images is to adopt the Mixed Raster Content (MRC) model, which segments a compound image into multiple layers and compresses each of the multiple layers with a separate compressor. For a non-limiting example, a screenshot can be segmented into a layer containing text and simple graphics as well as a layer containing continuous-tone images. Since MRC distributes the pixels of an image across multiple layers, each layer typically contains “don't care” pixels (or holes) whose values are determined by other layers. Some compression methods segment an image into blocks of pixels and operate on these blocks. A block of pixels in any layer of an image may contain “don't care” pixels only and, therefore, is not required for the reconstruction of the image from the individual layers. Such a block is referred to hereinafter as a “don't care” block. If a block contains at least one non-“don't care” pixel, it is not a “don't care” block. For the efficient compression of a compound image, where a layer of the image to be compressed contains “don't care” pixels and blocks, it is important to reduce or eliminate overhead in the compressed byte stream caused by unnecessary operation on the “don't care” blocks in the layers. In certain applications, it is also important to enable the compression of the compound image in web-based execution environments without altering the actual compressor(s) being used.
The foregoing examples of the related art and limitations related therewith are intended to be illustrative and not exclusive. Other limitations of the related art will become apparent upon a reading of the specification and a study of the drawings.